package top.roadvast.springboot.enum_test.bean;

/**
 * @Author 郭泽鹏
 * @Date 2021/10/20 11:47
 * @Version 1.0
 * @Description 自定义枚举
 */
public enum Color02 {
    RED("红色", 1),
    GREEN("绿色", 2),
    BLACK("黑色", 3),
    YELLOW("黄色", 4);

    private String color;

    private Integer index;

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public Integer getIndex() {
        return index;
    }

    public void setIndex(Integer index) {
        this.index = index;
    }

    Color02(String color, Integer index) {
        this.color = color;
        this.index = index;
    }

    @Override
    public String toString() {
        return "Color02{" +
                "color='" + color + '\'' +
                ", index=" + index +
                '}';
    }
}
